package com.whfc.hdc.enums;

/**
 * @author qzexing
 * @version 1.0
 * @date 2021-04-08 17:15
 */
public enum FshMediaSource {

    DEVICE(1, "硬件"),


    WEB(2, "后台");

    private final Integer value;

    private final String desc;

    FshMediaSource(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static FshMediaSource parseValue(Integer value) {
        if (value == null) {
            return null;
        }
        switch (value) {
            case 1:
                return DEVICE;
            case 2:
                return WEB;
            default:
                return null;
        }
    }


}
